<template>
  <div>
    <el-dialog
      v-toggle-full
      class="base-dialog"
      title="文件预览"
      :custom-class="'panna-dialog_big'"
      :visible.sync="previewFileShow"
      :before-close="handleClose"
      :append-to-body="true"
    >
      <PreviewFileContent
        :file="previewFile"
        :file-list="previewFileList"
        @handleClose="handleClose"
      ></PreviewFileContent>
    </el-dialog>
  </div>
</template>
<script>
import PreviewFileContent from "../PreviewFile/PreviewFileContent.vue";
export default {
  name: "BasePreviewFile",
  components: { PreviewFileContent },
  props: {
    // 默认预览框是关闭状态
    previewFileShow: {
      type: Boolean,
      default: false,
    },
    // 传递的参数
    previewFile: {
      type: Object,
      default: () => ({}),
    },
    previewFileList: {
      type: Array,
      default: () => [],
    },
  },
  data() {
    return {};
  },
  watch: {},
  created() {
    console.log("进入预览");
  },
  methods: {
    handleClose() {
      this.$emit("update:previewFileShow", false);
    },
  },
};
</script>
